//
//  NSDate+convenience.h
//
//  Created by in 't Veen Tjeerd on 4/23/12.
//  Copyright (c) 2012 Vurig Media. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSDate (Convenience)

-(NSDate *)offsetMonth:(int)numMonths;
-(NSDate *)offsetDay:(int)numDays;
-(NSDate *)offsetHours:(int)hours;
/**
 *  date所在月有几天
 *
 *  @return <#return value description#>
 */
-(NSInteger)numDaysInMonth;
/**
 *  本月第一天是周几
 *
 *  @return <#return value description#>
 */
-(NSInteger)firstWeekDayInMonth;
-(NSInteger)year;
-(NSInteger)month;
-(NSInteger)day;

/**
 *  date的前一天
 *
 *  @param date <#date description#>
 *
 *  @return 前一天的date
 */
+(NSDate *)dateStartOfDay:(NSDate *)date;
/**
 *
 *
 *  @return 本周的第一天
 */
+(NSDate *)dateStartOfWeek;
/**
 *
 *
 *  @return 下一月的1号
 */
+(NSDate *)dateEndOfWeek;

@end
